package org.linlinjava.litemall.db.dao.order_manage;

import org.apache.ibatis.annotations.Param;
import org.linlinjava.litemall.db.domain.LitemallGoodsProduct;
import org.linlinjava.litemall.db.vo.order_manage.BackendGoodsListVo;
import org.linlinjava.litemall.db.vo.order_manage.GoodsCategoryVo;

import java.util.List;

public interface BackendGoodsMapper {
    List<BackendGoodsListVo> goodsList(@Param("busId") Integer busId,
                                       @Param("commodityName") String commodityName,
                                       @Param("commdityType") Integer commdityType,
                                       @Param("commditySubType") Integer commditySubType,
                                       @Param("commdityState") Integer commdityState,
                                       @Param("goodsType") String goodsType,
                                       @Param("storeId") Integer storeId,
                                       @Param("isRelate") Integer isRelate,
                                       @Param("sort") String sort,
                                       @Param("desc") String desc);

    LitemallGoodsProduct getPartProductBySpecId(@Param("specId") Integer specId);
    LitemallGoodsProduct getServiceProductBySpecId(@Param("specId") Integer specId);
    LitemallGoodsProduct getOnlineProductBySpecId(@Param("specId") Integer specId);

    void updateStoreGoodsRfid(@Param("commodityId") Long commodityId, @Param("shopId") Long shopId);

    List<GoodsCategoryVo> categoryList(@Param("busId") Integer busId);
    List<GoodsCategoryVo> subCategoryList(@Param("busId") Integer busId, @Param("categoryId") Integer categoryId);

    int chainLockNum(@Param("commodityId") Long commodityId, @Param("storeId") Long storeId);
    int cabinetLockNum(@Param("commodityId") Long commodityId, @Param("storeId") Long storeId);
    int cloudLockNum(@Param("commodityId") Long commodityId);
}
